<?php if (!defined('THINK_PATH')) exit();?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="__PUBLIC__/css/common.css">
<link rel="stylesheet" href="__PUBLIC__/css/main.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script type="text/javascript"
	src="__PUBLIC__/js/colResizable-1.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
      $(function(){  
        $(".list_table").colResizable({
          liveDrag:true,
          gripInnerHtml:"<div class='grip'></div>", 
          draggingClass:"dragging", 
          minWidth:30
        }); 
        
      }); 
   </script>
<title>社区帖子列表</title>
</head>
<body>
<!--
 登陆成功<?php echo ($_SESSION['user']['username']); ?>
 -->
<div id="search_bar" class="mt10">
<div class="box">
<div class="box_border">
<div class="box_top"><b class="pl15">搜索</b></div>
<div class="box_center pt10 pb10">
<form id="form" class="" action="<?php echo U('Note/noteList');?>"
	method="post">
<table class="form_table" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>帖子标题</td>
		<td><input type="text" name="title" value="<?php echo ($title); ?>"
			class="input-text lh25" size="20"></td>
		<td>订单状态</td>
		<td><select class="select" id='type' name="type">
			<option value="">---全部---</option>
			<?php if(($type == '体验说说')): ?>
			<option value="体验说说" selected="selected">体验说说</option>
			<?php else: ?>
			<option value="体验说说">体验说说</option>
			<?php endif; ?>
			<?php if(($type == '学习交流')): ?>
			<option value="学习交流" selected="selected">学习交流</option>
			<?php else: ?>
			<option value="学习交流">学习交流</option>
			<?php endif; ?>
			<?php if(($type == '成长日志')): ?>
			<option value="成长日志" selected="selected">成长日志</option>
			<?php else: ?>
			<option value="成长日志">成长日志</option>
			<?php endif; ?>
			<?php if(($type == '意见反馈')): ?>
			<option value="意见反馈" selected="selected">意见反馈</option>
			<?php else: ?>
			<option value="意见反馈">意见反馈</option>
			<?php endif; ?>
		</select></td>
		<td><input type="submit" class="btn btn82 btn_search" value="查询"></td>
	</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<div id="table" class="mt10">
<div class="box span10 oh">
<table width="100%" border="0" cellpadding="0" cellspacing="0"
	class="list_table">
	<tr class="tr">
		<th>序号</th>
		<th>用户姓名</th>
		<th>发帖时间</th>
		<th>帖子标题</th>
		<th>帖子类型</th>
		<th width="150px">操作</th>
	</tr>
	<?php if(is_array($list)): foreach($list as $key=>$vo): ?>
	<tr class="tr">
		<td class="td_center"><?php echo ($key+1); ?></td>
		<td class="td_center"><?php echo ($vo["name"]); ?></td>
		<td class="td_center"><?php echo ($vo["create_time"]); ?></td>
		<td class="td_center"><a
			href="<?php echo U('Note/noteLook');?>?id=<?php echo ($vo["id"]); ?>"><?php echo ($vo["title"]); ?></a></td>
		<td class="td_center"><?php echo ($vo["type"]); ?></td>
		<td class="td_center"><a
			href="<?php echo U('Note/noteLook');?>?id=<?php echo ($vo["id"]); ?>">查看</a>
			<?php if(($vo["top"] == '0')): ?><a
			href="<?php echo U('Note/noteTop');?>?id=<?php echo ($vo["id"]); ?>&p=<?php echo ($p); ?>"
			onclick="return del1();">置顶</a> <?php else: ?> <a
			href="<?php echo U('Note/noteNoTop');?>?id=<?php echo ($vo["id"]); ?>&p=<?php echo ($p); ?>"
			onclick="return del2();">取消置顶</a><?php endif; ?> <a
			href="<?php echo U('Note/noteDel');?>?id=<?php echo ($vo["id"]); ?>&p=<?php echo ($p); ?>"
			onclick="return del();">删除</a></td>
	</tr>
	<?php endforeach; endif; ?>
</table>
<div class="page mt10" align='right'>
<div class="pagination"><?php echo ($page); ?>&nbsp;&nbsp;&nbsp;&nbsp;</div>

</div>
</div>
</div>
<script type="text/javascript">
        function del1()
        {
            if (confirm("确定要置顶帖子吗？" ))
            {
                return true ;
            }
            else
            {
                return false ;
            }
        }
        function del2()
        {
            if (confirm("确定要取消置顶吗？" ))
            {
                return true ;
            }
            else
            {
                return false ;
            }
        }
	 </script>
</body>
